<?php
if(!defined('IN_SONG')) exit('No direct script access allowed');  
/**
 * Class Home Module
 * 
 * @package         Module
 * @subpackage      Test
 * @version         0.1
 * @copyright       Song (c) 2011
 */   
class HomeController extends Controller
{
    var $name = 'Home';
                            
    function __construct() {
        parent::__construct();       
    }   
    
    function isSubmit()
    {
         
    }
    
    function draw() { 
        $this->Template->setFile('AdminHome', 'templates/admin/home.html'); 
        require_once LIB.DS.'fckeditor.class.php';
        //$sBasePath = $_SERVER['PHP_SELF'] ; 
        //$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
        //echo $sBasePath;
        $oFCKeditor = new FCKeditor('FCKeditor1') ;
        //$oFCKeditor->BasePath    = $sBasePath ;
        //$oFCKeditor->Value        = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
        $fckeditor = $oFCKeditor->Create() ;
        
        $this->Template->setVar('fckeditor', $fckeditor);
        
        $this->Template->parse('OUT', 'AdminHome');
        return $this->Template->p('OUT');   
    }
} 
?>
